﻿#ifndef _CSEM_H_
#define _CSEM_H_

#ifdef __cplusplus
extern "C" {
#endif

typedef struct _csem_ {
	//attribute
	void* handle;

	//action
	int (*signal)(struct _csem_*);
	int (*wait)(struct _csem_*);
} CSem;

int construct_sem(CSem* sem, long initial_count);

#ifdef __cplusplus
}
#endif
#endif
